﻿<?xml version="1.0" encoding="UTF-8"?>
<helpItems schema="maml">
  <!-- v 0.1.0.1 -->
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10">
    <command:details>
      <command:name>Export-SystemMessage</command:name>
      <maml:description>
        <maml:para>Exports system messages from a SQL Server instance.</maml:para>
      </maml:description>
      <maml:copyright>
        <maml:para>
        </maml:para>
      </maml:copyright>
      <command:verb>Export</command:verb>
      <command:noun>SystemMessage</command:noun>
      <dev:version>
      </dev:version>
    </command:details>
    <maml:description>
      <maml:para>The Export-SystemMessage Cmdlet queries the [sys].[messages] catalog view (or the [master].[dbo].[sysmessages] system table for SQL Server 2000) and writes the results to a tab-delimited text file.</maml:para>
    </maml:description>
    <!-- Cmdlet syntax section-->
    <command:syntax>
      <command:syntaxItem>
        <maml:name>Export-SystemMessage</maml:name>
        <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1">
          <maml:name>OutputFilePath</maml:name>
          <maml:description>
            <maml:para>The path of the file to which the system messages should be written.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        </command:parameter>
        <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2">
          <maml:name>ServerName</maml:name>
          <maml:description>
            <maml:para>The name of the SQL Server instance from which the system messages should be exported.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        </command:parameter>
        <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3">
          <maml:name>TrustedConnection</maml:name>
          <maml:description>
            <maml:para>A switch that indicates Windows Authentication (SSPI) to access the SQL Server instance.</maml:para>
          </maml:description>
          <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
        </command:parameter>
        <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="4">
          <maml:name>MessageIDsToExclude</maml:name>
          <maml:description>
            <maml:para>The IDs of messages that should be excluded from the export.</maml:para>
          </maml:description>
          <command:parameterValue required="false" variableLength="true">Int32[]</command:parameterValue>
        </command:parameter>
        <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="5">
          <maml:name>LanguageID</maml:name>
          <maml:description>
            <maml:para>The language of the system messages to export.</maml:para>
          </maml:description>
          <command:parameterValue required="false" variableLength="false">Int16</command:parameterValue>
        </command:parameter>
        <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="6">
          <maml:name>SQLServer2000</maml:name>
          <maml:description>
            <maml:para>A switch that indicates that the target SQL Server instance is running SQL Server 2000 (8.0).</maml:para>
          </maml:description>
          <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
        </command:parameter>
        <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="7">
          <maml:name>ApplicationName</maml:name>
          <maml:description>
            <maml:para>The connection string will include the "Application Name" keywords, which provides context to the SQL Server instance.  By default, the application name defaults to the name of the module, but this can be overridden.</maml:para>
          </maml:description>
          <command:parameterValue required="false" variableLength="false">String</command:parameterValue>
        </command:parameter>
      </command:syntaxItem>
      <command:syntaxItem>
        <maml:name>Export-SystemMessage</maml:name>
        <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1">
          <maml:name>OutputFilePath</maml:name>
          <maml:description>
            <maml:para>The path of the file to which the system messages should be written.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        </command:parameter>
        <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2">
          <maml:name>ServerName</maml:name>
          <maml:description>
            <maml:para>The name of the SQL Server instance from which the system messages should be exported.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        </command:parameter>
        <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3">
          <maml:name>UserName</maml:name>
          <maml:description>
            <maml:para>When using SQL Server Authentication, this is the name of the login to use when connecting to the SQL Server instance.</maml:para>
          </maml:description>
          <command:parameterValue required="false" variableLength="false">String</command:parameterValue>
        </command:parameter>
        <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="4">
          <maml:name>Password</maml:name>
          <maml:description>
            <maml:para>When using SQL Server Authentication, this is the password of the login to use when connecting to the SQL Server instance.</maml:para>
          </maml:description>
          <command:parameterValue required="false" variableLength="false">String</command:parameterValue>
        </command:parameter>
        <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="5">
          <maml:name>MessageIDsToExclude</maml:name>
          <maml:description>
            <maml:para>The IDs of messages that should be excluded from the export.</maml:para>
          </maml:description>
          <command:parameterValue required="false" variableLength="true">Int32[]</command:parameterValue>
        </command:parameter>
        <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="6">
          <maml:name>LanguageID</maml:name>
          <maml:description>
            <maml:para>The language of the system messages to export.</maml:para>
          </maml:description>
          <command:parameterValue required="false" variableLength="false">Int16</command:parameterValue>
        </command:parameter>
        <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="7">
          <maml:name>SQLServer2000</maml:name>
          <maml:description>
            <maml:para>A switch that indicates that the target SQL Server instance is running SQL Server 2000 (8.0).</maml:para>
          </maml:description>
          <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
        </command:parameter>
        <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="8">
          <maml:name>ApplicationName</maml:name>
          <maml:description>
            <maml:para>The connection string will include the "Application Name" keywords, which provides context to the SQL Server instance.  By default, the application name defaults to the name of the module, but this can be overridden.</maml:para>
          </maml:description>
          <command:parameterValue required="false" variableLength="false">String</command:parameterValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <!-- Cmdlet parameter section  -->
    <command:parameters>
      <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1">
        <maml:name>OutputFilePath</maml:name>
        <maml:description>
          <maml:para>The path of the file to which the system messages should be written.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2">
        <maml:name>ServerName</maml:name>
        <maml:description>
          <maml:para>The name of the SQL Server instance from which the system messages should be exported.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3">
        <maml:name>TrustedConnection</maml:name>
        <maml:description>
          <maml:para>A switch that indicates Windows Authentication (SSPI) to access the SQL Server instance.</maml:para>
        </maml:description>
        <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
        <dev:type>
          <maml:name>SwitchParameter</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="4">
        <maml:name>UserName</maml:name>
        <maml:description>
          <maml:para>When using SQL Server Authentication, this is the name of the login to use when connecting to the SQL Server instance.</maml:para>
        </maml:description>
        <command:parameterValue required="false" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="5">
        <maml:name>Password</maml:name>
        <maml:description>
          <maml:para>When using SQL Server Authentication, this is the password of the login to use when connecting to the SQL Server instance.</maml:para>
        </maml:description>
        <command:parameterValue required="false" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="6">
        <maml:name>MessageIDsToExclude</maml:name>
        <maml:description>
          <maml:para>The IDs of messages that should be excluded from the export.</maml:para>
        </maml:description>
        <command:parameterValue required="false" variableLength="true">Int32[]</command:parameterValue>
        <dev:type>
          <maml:name>Int32[]</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="7">
        <maml:name>LanguageID</maml:name>
        <maml:description>
          <maml:para>The language of the system messages to export.  If this value is not provided, it defaults to the LCID of the current thread.</maml:para>
        </maml:description>
        <command:parameterValue required="false" variableLength="false">Int16</command:parameterValue>
        <dev:type>
          <maml:name>Int16</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>System.Globalization.CultureInfo.CurrentCulture.LCID</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="8">
        <maml:name>SQLServer2000</maml:name>
        <maml:description>
          <maml:para>A switch that indicates that the target SQL Server instance is running SQL Server 2000 (8.0).</maml:para>
        </maml:description>
        <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
        <dev:type>
          <maml:name>SwitchParameter</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="9">
        <maml:name>ApplicationName</maml:name>
        <maml:description>
          <maml:para>The connection string will include the "Application Name" keywords, which provides context to the SQL Server instance.  By default, the application name defaults to the name of the module, but this can be overridden.</maml:para>
        </maml:description>
        <command:parameterValue required="false" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>&quot;SQL Server Error Log Parsing module&quot;</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <!-- Input - Output section-->
    <command:inputTypes>
      <command:inputType>
        <dev:type>
          <maml:name>None</maml:name>
          <maml:uri />
          <maml:description />
        </dev:type>
        <maml:description>
          <maml:para>You cannot pipe objects to Export-SystemMessage.</maml:para>
        </maml:description>
      </command:inputType>
    </command:inputTypes>
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
          <maml:description />
        </dev:type>
        <maml:description>
          <maml:para>This Cmdlet outputs the name of the file into which the system messages were written.</maml:para>
        </maml:description>
      </command:returnValue>
    </command:returnValues>
    <!-- Error section-->
    <command:terminatingErrors />
    <command:nonTerminatingErrors />
    <!-- Notes section  -->
    <maml:alertSet>
      <maml:title>
      </maml:title>
      <maml:alert>
        <maml:para>
        </maml:para>
      </maml:alert>
      <maml:alert>
        <maml:para>
        </maml:para>
      </maml:alert>
    </maml:alertSet>
    <!-- Example section  -->
    <command:examples>
      <command:example>
        <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title>
        <maml:introduction>
          <maml:para>
          </maml:para>
        </maml:introduction>
        <dev:code>C:\PS&gt; Export-SystemMessage -OutputFilePath 'C:\PS\SystemMessages.txt' -ServerName "$(Get-WMIObject -Class 'Win32_ComputerSystem').Name)" -TrustedConnection;</dev:code>
        <dev:remarks>
          <maml:para>Description</maml:para>
          <maml:para>-----------</maml:para>
          <maml:para>This command-line exports all system messages from the default SQL Server instance on the current machine, using Windows Authentication.</maml:para>
          <maml:para>
          </maml:para>
          <maml:para>
          </maml:para>
          <maml:para>
          </maml:para>
        </dev:remarks>
        <command:commandLines>
          <command:commandLine>
            <command:commandText>
            </command:commandText>
          </command:commandLine>
        </command:commandLines>
      </command:example>
      <command:example>
        <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title>
        <maml:introduction>
          <maml:para>
          </maml:para>
        </maml:introduction>
        <dev:code>C:\PS&gt; $Credentials = Get-Credential;
C:\PS&gt; [Int[]]$MessageIDsToExclude = 13001..13053 + 13057 + 13076..13090 + 14201 + 14205..14216 + 14218..14220 + 14549..14580 + 34050..34053 + (7922, 14588, 14589, 14594, 14599, 17060, 17069, 20530, 20545, 20555, 20586, 22817);
C:\PS&gt; [String]$SystemMessagesFilePath = 'C:\PS\SystemMessages_2008R2.txt';
C:\PS&gt; [String]$ServerName = 'Server01\SS2008R2';
C:\PS&gt; Export-SystemMessage -OutputFilePath $SystemMessagesFilePath -ServerName $ServerName -UserName "$($Credentials.GetNetworkCredential().UserName)" -Password "$($Credentials.GetNetworkCredential().Password)" -MessageIDsToExclude $MessageIDsToExclude | Out-Null;
C:\PS&gt; &amp; 'NotePad.exe' $SystemMessagesFilePath;</dev:code>
        <dev:remarks>
          <maml:para>Description</maml:para>
          <maml:para>-----------</maml:para>
          <maml:para>These command-lines collect the user name and password (for connecting to SQL Server using SQL Server authentication) and then export most of the system messages from a named SQL Server instance.  The filtered out messages consist of items that are not relevant for parsing SQL Server error log entries.</maml:para>
          <maml:para>The exported messages will be opened in the Notepad text editor upon completion of the export.</maml:para>
          <maml:para>
          </maml:para>
          <maml:para>
          </maml:para>
          <maml:para>
          </maml:para>
        </dev:remarks>
        <command:commandLines>
          <command:commandLine>
            <command:commandText>
            </command:commandText>
          </command:commandLine>
        </command:commandLines>
      </command:example>
    </command:examples>
    <!-- Link section  -->
    <maml:relatedLinks>
      <maml:navigationLink>
        <maml:linkText>Online version:</maml:linkText>
        <maml:uri>http://ParseERRORLOG.CodePlex.com/wikipage?title=Documentation_Export-SystemMessage</maml:uri>
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText>Get-ErrorLogEvent</maml:linkText>
        <maml:uri />
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText>New-MessageTemplateFile</maml:linkText>
        <maml:uri />
      </maml:navigationLink>
    </maml:relatedLinks>
  </command:command>

  <!-- v 0.1.0.1 -->
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10">
    <command:details>
      <command:name>Get-ErrorLogEvent</command:name>
      <maml:description>
        <maml:para>Parses the contents of SQL Server error log (ERRORLOG) files.</maml:para>
      </maml:description>
      <maml:copyright>
        <maml:para>
        </maml:para>
      </maml:copyright>
      <command:verb>Get</command:verb>
      <command:noun>ErrorLogEvent</command:noun>
      <dev:version>
      </dev:version>
    </command:details>
    <maml:description>
      <maml:para>The Get-ErrorLogEvent Cmdlet extracts details of events from SQL Server error log (ERRORLOG) files.  It uses the templates from the [sys].[messages] catalog view to parse the message text into the corresponding message ID and message parameters.</maml:para>
    </maml:description>
    <!-- Cmdlet syntax section-->
    <command:syntax>
      <command:syntaxItem>
        <maml:name>Get-ErrorLogEvent</maml:name>
        <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByValue)" position="1">
          <maml:name>LiteralPath</maml:name>
          <maml:description>
            <maml:para>The path to the SQL Server error log file to be parsed.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        </command:parameter>
        <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2">
          <maml:name>MessageTemplateFilePath</maml:name>
          <maml:description>
            <maml:para>The path to text file that contains the SQL Server error message templates.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        </command:parameter>
        <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3">
          <maml:name>ParsingMetricsDirectoryPath</maml:name>
          <maml:description>
            <maml:para>The path to the directory into which the parsing metrics files should be written.  If the parsing metrics are unwanted, this parameter should not be supplied.</maml:para>
          </maml:description>
          <command:parameterValue required="false" variableLength="false">String</command:parameterValue>
        </command:parameter>
        <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="4">
          <maml:name>ParsingMetricsFileNameFormat</maml:name>
          <maml:description>
            <maml:para>If parsing metrics are going to be saved to disk, this parameter controls the format of the output file name.  There are a few tokens that can be automatically replaced by run-time meta data.</maml:para>
          </maml:description>
          <command:parameterValue required="false" variableLength="false">String</command:parameterValue>
        </command:parameter>
        <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="5">
          <maml:name>EmitParsingMetrics</maml:name>
          <maml:description>
            <maml:para>Providing this switch indicates that the parsing metrics (run-time information on the parsing process) should be written to the output pipeline along with the error log entries.</maml:para>
          </maml:description>
          <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
          <dev:type>
            <maml:name>SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
        </command:parameter>
        <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
          <maml:name>HistoricalMatchCounts</maml:name>
          <maml:description>
            <maml:para>A HashTable that contains historical counts for the number of times that various system messages have been parsed out of SQL Server error logs.  It is not necessary to include all system messages, only those that should have a historical count different from the default of zero.  It is also possible to provide negative values, to purposely push infrequent messages to the bottle of the list.  Use the format @{&lt;message ID&gt; = &lt;message count&gt;}.</maml:para>
          </maml:description>
          <command:parameterValue required="false" variableLength="false">HashTable</command:parameterValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <!-- Cmdlet parameter section  -->
    <command:parameters>
      <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByValue)" position="1">
        <maml:name>LiteralPath</maml:name>
        <maml:description>
          <maml:para>The path to the SQL Server error log file to be parsed.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2">
        <maml:name>MessageTemplateFilePath</maml:name>
        <maml:description>
          <maml:para>The path to text file that contains the SQL Server error message templates.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3">
        <maml:name>ParsingMetricsDirectoryPath</maml:name>
        <maml:description>
          <maml:para>The path to the directory into which the parsing metrics files should be written.  If the parsing metrics are unwanted, this parameter should not be supplied.</maml:para>
        </maml:description>
        <command:parameterValue required="false" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="4">
        <maml:name>ParsingMetricsFileNameFormat</maml:name>
        <maml:description>
          <maml:para>If parsing metrics are going to be saved to disk, this parameter controls the format of the output file name.  There are a few tokens that can be automatically replaced by run-time meta data.</maml:para>
          <maml:para>For this release of the module, the following tokens are available:
    -- __COMPUTER_NAME__: The name of the computer on which the error log parsing is being performed.
    -- __CURRENT_TIME__: The time at which the parsing metrics are being saved.
    -- __DOMAIN_NAME__: The name of the Active Directory domain of the user performing the error log parsing.
    -- __PID__: The process ID of the PowerShell host.
    -- __START_TIME__: The time at which parsing of the current error log began.
    -- __TICK_COUNT__: The number of milliseconds that have passed since the last time the computer was started.
    -- __USER_NAME__: The name of the user that is performing the error log parsing.
          </maml:para>
        </maml:description>
        <command:parameterValue required="false" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>&quot;__COMPUTER_NAME__,SQL Server error log parsing metrics,__START_TIME__.xml&quot;</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="5">
        <maml:name>EmitParsingMetrics</maml:name>
        <maml:description>
          <maml:para>Providing this switch indicates that the parsing metrics (run-time information on the parsing process) should be written to the output pipeline along with the error log entries.</maml:para>
        </maml:description>
        <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
        <dev:type>
          <maml:name>SwitchParameter</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="6">
        <maml:name>HistoricalMatchCounts</maml:name>
        <maml:description>
          <maml:para>A HashTable that contains historical counts for the number of times that various system messages have been parsed out of SQL Server error logs.  It is not necessary to include all system messages, only those that should have a historical count different from the default of zero.  It is also possible to provide negative values, to purposely push infrequent messages to the bottle of the list.  Use the format @{&lt;message ID&gt; = &lt;message count&gt;}.</maml:para>
        </maml:description>
        <command:parameterValue required="false" variableLength="false">HashTable</command:parameterValue>
        <dev:type>
          <maml:name>HashTable</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <!-- Input - Output section-->
    <command:inputTypes>
      <command:inputType>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
          <maml:description />
        </dev:type>
        <maml:description>
          <maml:para>This Cmdlet accepts the paths to one or more SQL Server error log files.</maml:para>
        </maml:description>
      </command:inputType>
    </command:inputTypes>
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>SQLServerSleuth.PowerShell.Commands.ParseERRORLOG.ErrorLogEvent</maml:name>
          <maml:uri />
          <maml:description />
        </dev:type>
        <maml:description>
          <maml:para>This Cmdlet outputs objects that represent the events found in the SQL Server error logs.</maml:para>
        </maml:description>
      </command:returnValue>
    </command:returnValues>
    <!-- Error section-->
    <command:terminatingErrors />
    <command:nonTerminatingErrors />
    <!-- Notes section  -->
    <maml:alertSet>
      <maml:title>
      </maml:title>
      <maml:alert>
        <maml:para>
        </maml:para>
      </maml:alert>
      <maml:alert>
        <maml:para>
        </maml:para>
      </maml:alert>
    </maml:alertSet>
    <!-- Example section  -->
    <command:examples>
      <command:example>
        <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title>
        <maml:introduction>
          <maml:para>
          </maml:para>
        </maml:introduction>
        <dev:code>C:\PS&gt; Get-ErrorLogEvent -LiteralPath 'C:\PS\ERRORLOG.3' -MessageTemplateFilePath 'C:\PS\MessageTemplates_2008R2.txt';</dev:code>
        <dev:remarks>
          <maml:para>Description</maml:para>
          <maml:para>-----------</maml:para>
          <maml:para>This command-line performs the basic parsing of a SQL Server error log.</maml:para>
          <maml:para>In this case the message templates file already exists.  See EXAMPLE 1 of the New-MessageTemplateFile Cmdlet help topic for more information.</maml:para>
          <maml:para>
          </maml:para>
          <maml:para>
          </maml:para>
          <maml:para>
          </maml:para>
        </dev:remarks>
        <command:commandLines>
          <command:commandLine>
            <command:commandText>
            </command:commandText>
          </command:commandLine>
        </command:commandLines>
      </command:example>
    </command:examples>
    <!-- Link section  -->
    <maml:relatedLinks>
      <maml:navigationLink>
        <maml:linkText>Online version:</maml:linkText>
        <maml:uri>http://ParseERRORLOG.CodePlex.com/wikipage?title=Documentation_Get-ErrorLogEvent</maml:uri>
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText>Export-SystemMessage</maml:linkText>
        <maml:uri />
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText>New-MessageTemplateFile</maml:linkText>
        <maml:uri />
      </maml:navigationLink>
    </maml:relatedLinks>
  </command:command>
  <!-- v 0.1.0.1 -->
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10">
    <command:details>
      <command:name>New-MessageTemplateFile</command:name>
      <maml:description>
        <maml:para>Post-processes system messages for parsing SQL Server error logs.</maml:para>
      </maml:description>
      <maml:copyright>
        <maml:para>
        </maml:para>
      </maml:copyright>
      <command:verb>New</command:verb>
      <command:noun>MessageTemplateFile</command:noun>
      <dev:version>
      </dev:version>
    </command:details>
    <maml:description>
      <maml:para>The New-MessageTemplateFile Cmdlet is used to post-process system messages so that they are suitable for use by the SQL Server Cmdlet.  Any printf() style tokens are replaced with the appropriate Regular Expression patterns.</maml:para>
    </maml:description>
    <!-- Cmdlet syntax section-->
    <command:syntax>
      <command:syntaxItem>
        <maml:name>New-MessageTemplateFile</maml:name>
        <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByValue)" position="1">
          <maml:name>SystemMessageFilePath</maml:name>
          <maml:description>
            <maml:para>The path to the file into which the targeted SQL Server system messages have been exported (via the Export-SystemMessage Cmdlet).</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        </command:parameter>
        <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2">
          <maml:name>OutputFilePath</maml:name>
          <maml:description>
            <maml:para>The path to the text file into which the message templates should be written.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <!-- Cmdlet parameter section  -->
    <command:parameters>
      <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByValue)" position="1">
        <maml:name>SystemMessageFilePath</maml:name>
        <maml:description>
          <maml:para>The path to the file into which the targeted SQL Server system messages have been exported (via the Export-SystemMessage Cmdlet).</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2">
        <maml:name>OutputFilePath</maml:name>
        <maml:description>
          <maml:para>The path to the text file into which the message templates should be written.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <!-- Input - Output section-->
    <command:inputTypes>
      <command:inputType>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
          <maml:description />
        </dev:type>
        <maml:description>
          <maml:para>The name of the system messages file (created by the Export-SystemMessage Cmdlet) can be piped to the New-MessageTemplateFile Cmdlet.</maml:para>
        </maml:description>
      </command:inputType>
    </command:inputTypes>
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
          <maml:description />
        </dev:type>
        <maml:description>
          <maml:para>This Cmdlet outputs the name of the file into which the message templates were written.</maml:para>
        </maml:description>
      </command:returnValue>
    </command:returnValues>
    <!-- Error section-->
    <command:terminatingErrors />
    <command:nonTerminatingErrors />
    <!-- Notes section  -->
    <maml:alertSet>
      <maml:title>
      </maml:title>
      <maml:alert>
        <maml:para>
        </maml:para>
      </maml:alert>
      <maml:alert>
        <maml:para>
        </maml:para>
      </maml:alert>
    </maml:alertSet>
    <!-- Example section  -->
    <command:examples>
      <command:example>
        <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title>
        <maml:introduction>
          <maml:para>
          </maml:para>
        </maml:introduction>
        <dev:code>C:\PS&gt; New-MessageTemplateFile -SystemMessageFilePath 'C:\PS\SystemMessages.txt' -OutputFilePath 'C:\PS\MessageTemplates.txt';</dev:code>
        <dev:remarks>
          <maml:para>Description</maml:para>
          <maml:para>-----------</maml:para>
          <maml:para>This command-line post-processes the system messages that were exported by the Export-SystemMessage Cmdlet.</maml:para>
          <maml:para>
          </maml:para>
          <maml:para>
          </maml:para>
          <maml:para>
          </maml:para>
        </dev:remarks>
        <command:commandLines>
          <command:commandLine>
            <command:commandText>
            </command:commandText>
          </command:commandLine>
        </command:commandLines>
      </command:example>
    </command:examples>
    <!-- Link section  -->
    <maml:relatedLinks>
      <maml:navigationLink>
        <maml:linkText>Online version:</maml:linkText>
        <maml:uri>http://ParseERRORLOG.CodePlex.com/wikipage?title=Documentation_New-MessageTemplateFile</maml:uri>
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText>Export-SystemMessage</maml:linkText>
        <maml:uri />
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText>Get-ErrorLogEvent</maml:linkText>
        <maml:uri />
      </maml:navigationLink>
    </maml:relatedLinks>
  </command:command>
</helpItems>